Using mipmaps

Use mipmaps to create a set of downscaled sublevels from a large texture. Mipmaps increase the GPU memory use by one third, but improve the performance when the full texture does not have to be sampled. Use mimaps to improve the performance whenever you scale a textured node.

For example, a 256 by 256 pixels texture has mipmap levels that reduce the texture to 128 by 128, 64 by 64, and so on until 1 by 1 pixel. The performance improves because smaller mipmap levels fit better in the fixed-size texture cache in the GPU.

When you create mipmaps in a third-party tool and include them in a .dds file, Kanzi Studio extracts the images for mipmap levels and uses them

Avoid creating mipmaps from .jpeg textures, because the .jpeg image format causes the quality of the mipmaps to degrade.

Generating mipmaps for a texture

When you import an image that does not contain mipmaps, you can generate the mipmaps for the texture from that image in Kanzi Studio.

To generate mipmaps for a texture:

  1. In the Library select Resource Files > Images, and select the image for which you want to create mipmaps.
    Avoid creating mipmaps from .jpeg textures, because the .jpeg image format causes the quality of the mipmaps to degrade.
  2. In the Properties enable the Generate Mipmaps property.
  3. In the Library right-click the image for which you want to create mipmaps and select Preprocess images.
    Kanzi Studio generates mipmaps for the image you selected.
    Preprocess the images for which you want to generate mipmaps, because otherwise Kanzi Engine has to create the mipmaps when loading your application, which increases the loading time of your application. Note that Kanzi Engine cannot generate mipmaps for ETC compressed images.
  4. In the Library > Materials and Textures > Textures select the texture that uses the image for which you generated mipmaps and in the Properties set the Mipmap Mode property either to Linear or Nearest to take the mipmaps into use. See Filtering textures.

See also

Adjusting the data size

Loading resources in parallel

Compressing textures

Filtering textures

Measuring the performance of your application

Images and textures best practices

Best practices